package com.iwayin.core.dao.comment;

import java.util.List;

import com.iwayin.core.dataobject.CommentDO;

public interface CommentDAO {
	/**
	 * @author ZhangLei
	 * 添加评论
	 * @return
	 */
	public Long addComment(CommentDO commentDO);
	/**
	 * @author ZhangLei
	 * 删除评论
	 * @return
	 */
	public void deleteComment(CommentDO comment);
	/**
	 * 删除ask所有评论
	 * @param id
	 */
	public void deleteCommentByAskId(Long askId);
	
	/**
	 * @author ZhangLei
	 * 获取ask所有评论
	 * @return
	 */
	public List<CommentDO> findAskComments(CommentDO query);
	/**
	 * 
	 * @param size
	 * @return
	 */
	public List<CommentDO> findMostCommentToday(Long size);
	
	/***
	 *@param askId 
	 * @author ZhangLei
	 * @description 查询最新的评论
	 */
	public CommentDO findLatestComment(Long askId);
	/**
	 * 评论同上数+1
	 * @param commentId
	 */
	public void commentDittoPlusOne(Long commentId);
	/**
	 * 评论同上数-1
	 * @param commentId
	 */
	public void cancelCommentDitto(Long commentId);
}	
